// src/router/index.js
import Vue from 'vue';
import Router from 'vue-router';
import HomeView from '@/views/HomeView';
import VehicleManagement from '@/views/VehicleManagement';
import OwnerManagement from '@/views/OwnerManagement';
import ParkingSpotManagement from '@/views/ParkingSpotManagement';
import ParkingRecordView from '@/views/ParkingRecordView';
import Payment from '@/views/Payment'; // 确保有缴费视图的路由

Vue.use(Router);

export default new Router({
  mode: 'history',  // 使用 history 模式
  routes: [
    { path: '/', name: 'Home', component: HomeView },
    { path: '/vehicles', name: 'Vehicles', component: VehicleManagement },
    { path: '/owners', name: 'Owners', component: OwnerManagement },
    { path: '/parking-spots', name: 'ParkingSpots', component: ParkingSpotManagement },
    { path: '/parking-records', name: 'ParkingRecords', component: ParkingRecordView },
    { path: '/payment', name: 'Payment', component: Payment }  // 确保缴费页面路由配置正确
  ]
});
